#!/bin/bash -e
# $File: compile.sh
# $Date: Sun Jun 17 23:52:32 2012 +0800
# $Author: jiakai <jia.kai66@gmail.com>

fname=$1

if [ -z "$fname" ]
then
	echo "usage: $0 <asm filename>"
	exit -1
fi

fname_no_ext=${fname/.*/}
as $fname -o $fname_no_ext.o
ld $fname_no_ext.o -o $fname_no_ext
rm -f $fname_no_ext.o
